Results 1 to 4 of 4

Thread: Programs compiled in “simple c++” mode don't work when launching them from

  1. #1
    Join Date
    Feb 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Programs compiled in “simple c++” mode don't work when launching them from

    Programs compiled in "simple c++" mode in QtCreator don't work correctly when launching them from qtcreator, but work when launching out from this ide.

    When launching from QtCreator, the terminal window opens, i can enter in it anything, but program instructions don't work. The behavior without QtCreator is normal. This problem is in both: Debug and Release - buildes. Moreover, when i'm trying to use debug, breakpoints don't work too (even breakpoint set to the first line of main() function in main.cpp).

    What can I do to solve this problem? Is this a bug or I'm just clumsy? Thank you.

    The simple code that reproduce this problem:
    Qt Code:
    1. #include
    2.  
    3. using namespace std;
    4.  
    5. int main()
    6. {
    7. int num;
    8. cin >> num;
    9. cout << num << "\nHello world!\n";
    10. return 0;
    11. }
    To copy to clipboard, switch view to plain text mode 

    (Message to subscribe to thread)

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Programs compiled in “simple c++” mode don't work when launching them from

    try << std::endl; instead of the "\n". And make sure to use a real xterm as terminal, not a gnome-terminal or such.

  3. #3
    Join Date
    Feb 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Programs compiled in “simple c++” mode don't work when launching them from

    They (on other forum) answered me it's Qt bug.

  4. #4
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Programs compiled in “simple c++” mode don't work when launching them from

    Who is "they" and what bug should that be?

Similar Threads

  1. Code compiled on Qt 4.6.3 does not work on Qt 4.7.0
    By frikkasoft in forum Qt Programming
    Replies: 3
    Last Post: 14th December 2011, 08:29
  2. Replies: 3
    Last Post: 20th September 2010, 22:36
  3. Replies: 4
    Last Post: 11th June 2010, 19:27
  4. Programs compile in debug mode - solved
    By tpf80 in forum Installation and Deployment
    Replies: 1
    Last Post: 18th August 2008, 09:53
  5. Failed to Launch qt 4.4.0 compiled executable in Debug mode
    By nikhilqt in forum Installation and Deployment
    Replies: 2
    Last Post: 25th July 2008, 13:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.